package main

import (
	"google.golang.org/grpc"
	"grpc/helper"
	"grpc/services"
	"net"
)

func main(){

	rpcServer := grpc.NewServer(grpc.Creds(helper.GetServerCreds()))
	services.RegisterProdServiceServer(rpcServer,new(services.ProdService))//商品服务
	services.RegisterOrderServiceServer(rpcServer,new(services.OrdersService))//订单服务
	services.RegisterUserServiceServer(rpcServer,new(services.UserService))//用户服务
	lis,_ := net.Listen("tcp",":8088")

	rpcServer.Serve(lis)
}
